package Picture;

public class Rectangular extends Graphics {
    String name;
    double side1;
    double side2;
    public Rectangular(String name,double side1,double side2){
        super(name);
        this.name=name;
        this.side1=side1;
        this.side2=side2;
    }
    public void Circumference(){
        double c=2*side1*side2;
        System.out.println("长方形周长是："+c);
    }
    public void range(){
        double c=side1*side2;
        System.out.println("长方形面积是："+c);
    }


    public void setSide1(double side1) {
        this.side1 = side1;
    }

    public void setSide2(double side2) {
        this.side2 = side2;
    }

    public double getSide1() {
        return side1;
    }

    public double getSide2() {
        return side2;
    }
}
